package com.symria.server.po;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Formula;

@Entity
@Table(name = "APP_DATE_REPORT")
public class AppDateReport implements java.io.Serializable{

	// Fields

	private Integer id;
	private Integer appId;
	private String appName;
	private Integer requestCount;
	private Integer showCount;
	private Integer clickCount;
	private Integer actionCount;
	private Double payMoney;
	private Date createTime;
	private Double factMoney;
	private String state;

	// Constructors

	/** default constructor */
	public AppDateReport() {
	}

	/** minimal constructor */
	public AppDateReport(Integer appId, Date createTime) {
		this.appId = appId;
		this.createTime = createTime;
	}

	/** full constructor */
	public AppDateReport(Integer appId, Integer requestCount,
			Integer showCount, Integer clickCount, Integer actionCount,
			Double payMoney, Date createTime) {
		this.appId = appId;
		this.requestCount = requestCount;
		this.showCount = showCount;
		this.clickCount = clickCount;
		this.actionCount = actionCount;
		this.payMoney = payMoney;
		this.createTime = createTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	@Formula("(SELECT ai.APP_NAME FROM APP_INFO ai WHERE ai.APP_ID=APP_ID)")
	public String getAppName() {
		return appName;
	}

	public void setAppName(String appName) {
		this.appName = appName;
	}

	@Column(name = "APP_ID", nullable = false)
	public Integer getAppId() {
		return this.appId;
	}

	public void setAppId(Integer appId) {
		this.appId = appId;
	}

	@Column(name = "REQUEST_COUNT")
	public Integer getRequestCount() {
		return this.requestCount;
	}

	public void setRequestCount(Integer requestCount) {
		this.requestCount = requestCount;
	}

	@Column(name = "SHOW_COUNT")
	public Integer getShowCount() {
		return this.showCount;
	}

	public void setShowCount(Integer showCount) {
		this.showCount = showCount;
	}

	@Column(name = "CLICK_COUNT")
	public Integer getClickCount() {
		return this.clickCount;
	}

	public void setClickCount(Integer clickCount) {
		this.clickCount = clickCount;
	}

	@Column(name = "ACTION_COUNT")
	public Integer getActionCount() {
		return this.actionCount;
	}

	public void setActionCount(Integer actionCount) {
		this.actionCount = actionCount;
	}

	@Column(name = "PAY_MONEY", precision = 16, scale = 4)
	public Double getPayMoney() {
		return this.payMoney;
	}

	public void setPayMoney(Double payMoney) {
		this.payMoney = payMoney;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CREATE_TIME", nullable = false, length = 0)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Column(name = "FACT_MONEY", precision = 16, scale = 4)
	public Double getFactMoney() {
		return factMoney;
	}

	public void setFactMoney(Double factMoney) {
		this.factMoney = factMoney;
	}
	
	@Column(name = "STATE", precision = 16, scale = 4)
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	
	

}
